﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<script runat="server">
  private void Page_Load(object sender, System.EventArgs e)
  {
      ReportViewer1.LocalReport.ReportPath = Server.MapPath(ViewData["report_url"].ToString());
      ReportViewer1.LocalReport.DataSources.Add((ReportDataSource) ViewData["datasource"]);
      ReportViewer1.LocalReport.Refresh();
  }
</script>
 <form id="Form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" AsyncRendering="false" 
    Width="100%" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px"></rsweb:ReportViewer>
</form>
